package com.ittest.controller;

import org.springframework.stereotype.Component;

/**
 * @className: BooleanStrFormat
 * @description: TODO
 * @author: cheetah
 * @date: 2021/10/13 18:05
 * @Version: 1.0
 */
@Component
public class BooleanStrFormat {
    public String toStr(boolean type) {
        if(type){
            return "Y";
        }else{
            return "N";
        }
    }

    public boolean toBoolean(String type) {
        if (type.equals("Y")) {
            return true;
        } else {
            return false;
        }
    }
}
